// author by welong
// zuowl@qq.com
// 2014-09-05  13:08
// PAT basic 1013

#include <stdio.h>
#include <math.h>

#define bool  unsigned char
#define true  1
#define false 0

bool primer(int n)
{
	int i, isqrt = (int)sqrt(n);	//if not sqrt(n) cause the last test site error
									//out of time
	for(i = 2; i <= isqrt;i++)
	{
		if(n % i == 0)
			return false;
	}
	return true;
}

int main(int argc, char **argv)
{
	int m, n, i, j;
	int count = 0, result;
	
	scanf("%d%d", &m, &n);
	
	for(i=2, j=0; count <= n; i++)
	{
		result = primer(i);
		if(result)
		{
			count++;
		}
		
		if(result && count <=n && count >= m)
		{
			printf("%d", i);
			j++;
	
			if(count == n)
				break;

			if(j == 10)
			{
				printf("\n");
				j = 0;
			}
			else
				printf(" ");
		}
	}
	return 0;
}